<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改工作记录')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-ncNormalWorks-edit" th:object="${ncNormalWorks}">
        <input id="nWorkId" name="nWorkId" th:field="*{nWorkId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">工作名称：</label>
            <div class="col-sm-8">
                <input id="nWorckName" name="nWorckName" required th:field="*{nWorckName}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">参与人员：</label>
            <div class="col-sm-8">
                <input id="workers" name="workers" required th:field="*{workers}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">核验人：</label>
            <div class="col-sm-8">
                <input id="checkUser" name="checkUser" required th:field="*{checkUser}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">工作时长（时）：</label>
            <div class="col-sm-8">
                <input id="timeLength" name="timeLength" th:field="*{timeLength}" class="form-control" type="number" step="0.1" onkeyup=" value=value.replace(/^((\d+\.\d*[1-9]\d{1}))$/,'')" min="0">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">工作内容：</label>
            <div class="col-sm-8">
                <input id="content" name="content" th:field="*{content}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea id="remark" rows="4" name="remark" th:field="*{remark}" class="form-control"
                          type="text"></textarea>

            </div>
        </div>

    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "system/ncNormalWorks";
    $("#form-ncNormalWorks-edit").validate({
        rules: {
            xxxx: {
                required: true,
            },
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-ncNormalWorks-edit').serialize());
        }
    }
</script>
</body>
</html>
